<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK" %>
<%@ taglib uri="/WEB-INF/page.tld" prefix="page" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>帖子列表</title>
</head>
<body>
<table style="width: 1024px;" align="center"><tr><td>
<s:include value="/common/header.jsp" />
	<div style="width: 100%;background: #99ffcc;">
		<s:url id="index" value="/category"/>
		<s:a href="%{index}">首页</s:a><s:url id="showList" value="/category/%{category.id}"/>
		⇒<s:a href="%{showList}"><s:property value="category.categoryName" />帖子列表</s:a>
	</div>
	<div style="width: 100%;background: #99ffcc;">
		<s:url id="newArticle" value="/category/%{category.id}/newArticle"/>
		<s:a href="%{newArticle}">发表新帖</s:a>
	</div>
	<s:if test="category.articleNo<=0">
		本版块暂时还没有主题，期待你的添加。
	</s:if>
	<s:else>
		<table style="width: 1024px;">
			<tr style="font-size: x-small; font-weight: lighter;background: #cd853f;">
				<td style="width: 50px;">状态</td>
				<td style="width: 654px;">标题</td>
				<td style="width: 120px;">作者</td>
				<td style="width: 50px;">回帖数</td>
				<td style="width: 50px;">点击数</td>
				<td style="width: 100px;">最后发表</td>
			</tr>
			<s:iterator value="%{articles}">
				<tr>
					<td valign="top" class="articleTitle">有新帖</td>
					<td valign="top" class="articleTitle">
						<s:url id="articleShow" value="/article"/>
						<s:a href="%{articleShow}/%{id}">
							<s:property value="title" />&nbsp;
						</s:a>
					</td>
					<td valign="top" class="articleTitle">
						<s:property value="userName" /><br>
						<s:date format="yyyy-MM-dd HH:mm" name="updateTime"/>
					</td>
					<td valign="top" class="articleTitle"><s:property value="postNo" /></td>
					<td valign="top" class="articleTitle"><s:property value="clickNo" />&nbsp;</td>
					<td valign="top" class="articleTitle">
						<s:date format="yyyy-MM-dd HH:mm" name="lastPostDate"/><br>
						by <s:property value="lastPostUserName" />
					</td>
				</tr>
			</s:iterator>
		</table>
	</s:else>
<page:pager requestPath="/category/${category.id}"/>
<s:include value="/common/footer.jsp" />
</td></tr></table>
</body>
</html>